#include "Test.Font.h"

#undef  APP_NAME
#define APP_NAME	TestFontScissor
#undef  APP_BASE
#define APP_BASE	TestFont


class APP_NAME : public APP_BASE
{
public:
	APP_NAME (IPlatform *platform, EDevice::type deviceType) :
		APP_BASE( platform, deviceType )
	{}
	
	/*void Update (float dt) override
	{
		TestApp::Update( dt );

		ESS()->GetGraphicsEngine()->GetViewport()->Apply();
		ESS()->GetGLStateManager()->Clear( true, true, false );

		rect	text_region = rect(-0.5f, -0.5f, 0.5f, 0.5f );
		
		/*ESS()->GetGraphicsEngine()->GetBatchRender()->ScissorTest( false );
		fontBatch.SetColor( color4u(155, 155, 155, 255) );
		fontBatch.Draw( text_region, text );*//*
		
		fontBatch.SetColor( color4u(255, 0, 0, 255) );
		fontBatch.Draw( text_region, text );

		batch.Flush();
		batch.Clear();
		
		ESS()->GetGraphicsEngine()->SwapBuffers();
	}*/

	void OnEnter () override
	{
		APP_BASE::OnEnter();

		ESS()->GetGraphicsEngine()->GetBatchRender()->ScissorTest( true );
		ESS()->GetGraphicsEngine()->GetBatchRender()->Scissor( rect( -0.35f, -0.4f, 0.4f, 0.4f ) );

		text.Parse( "\n\n\n\n\n\n 2" );
	}
};